package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.YxSms;
import com.ruoyi.system.mapper.YxSmsMapper;
import com.ruoyi.system.service.IYxSmsService;

/**
 * 短信验证码Service业务层处理
 * 
 * @author ruoyi
 * @date 2019-10-16
 */
@Service
public class YxSmsServiceImpl implements IYxSmsService 
{
    @Autowired
    private YxSmsMapper yxSmsMapper;

    /**
     * 查询短信验证码
     * 
     * @param id 短信验证码ID
     * @return 短信验证码
     */
    @Override
    public YxSms selectYxSmsById(Long id)
    {
        return yxSmsMapper.selectYxSmsById(id);
    }

    /**
     * 查询短信验证码列表
     * 
     * @param yxSms 短信验证码
     * @return 短信验证码
     */
    @Override
    public List<YxSms> selectYxSmsList(YxSms yxSms)
    {
        return yxSmsMapper.selectYxSmsList(yxSms);
    }
    
    /**
     * 查询短信验证码列表
     * 
     * @param tSms 短信验证码
     * @return 短信验证码
     */
    @Override
    public List<YxSms> selectTSmsLists(YxSms tSms)
    {
        return yxSmsMapper.selectTSmsLists(tSms);
    }

    /**
     * 新增短信验证码
     * 
     * @param yxSms 短信验证码
     * @return 结果
     */
    @Override
    public int insertYxSms(YxSms yxSms)
    {
        return yxSmsMapper.insertYxSms(yxSms);
    }

    /**
     * 修改短信验证码
     * 
     * @param yxSms 短信验证码
     * @return 结果
     */
    @Override
    public int updateYxSms(YxSms yxSms)
    {
        return yxSmsMapper.updateYxSms(yxSms);
    }

    /**
     * 删除短信验证码对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteYxSmsByIds(String ids)
    {
        return yxSmsMapper.deleteYxSmsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除短信验证码信息
     * 
     * @param id 短信验证码ID
     * @return 结果
     */
    @Override
    public int deleteYxSmsById(Long id)
    {
        return yxSmsMapper.deleteYxSmsById(id);
    }
}
